import request from '@/utils/request'

// 查询待审批奖励列表
export function listAward(query) {
  return request({
    url: '/gxs/award/list',
    method: 'get',
    params: query
  })
}

// 查询待审批奖励详细
export function getAward(gxsPendAwardid) {
  return request({
    url: '/gxs/award/' + gxsPendAwardid,
    method: 'get'
  })
}

// 新增待审批奖励
export function addAward(data) {
  return request({
    url: '/gxs/award',
    method: 'post',
    data: data
  })
}

// 修改待审批奖励
export function updateAward(data) {
  return request({
    url: '/gxs/award',
    method: 'put',
    data: data
  })
}

// 删除待审批奖励
export function delAward(gxsPendAwardid) {
  return request({
    url: '/gxs/award/' + gxsPendAwardid,
    method: 'delete'
  })
}

// 查询我的审批奖励列表
export function myList(query) {
  return request({
    url: '/gxs/award/myList',
    method: 'get',
    params: query
  })
}

// 查询待审批奖励列表
export function pendList(query) {
  return request({
    url: '/gxs/award/pendList',
    method: 'get',
    params: query
  })
}

// 查询已审批奖励列表
export function approvedList(query) {
  return request({
    url: '/gxs/award/approvedList',
    method: 'get',
    params: query
  })
}

// 提交申请
export function applyAward(gxsPendAwardid) {
  return request({
    url: '/gxs/award/applyAward/' + gxsPendAwardid,
    method: 'get'
  })
}

// 审批奖励
export function examineAward(data) {
  return request({
    url: '/gxs/award/examineAward',
    method: 'put',
    data: data
  })
}


// 查询待审批活动列表
export function chartList(query) {
  return request({
    url: '/gxs/activity/chartList',
    method: 'get',
    params: query
  })
}
